package com.example.demos.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@ResponseBody
@Controller
public class CalcController {
    @RequestMapping("/calc/sum")
    public String calcAdd(Integer num1, Integer num2){
        int sum = num1 + num2;
        return "计算结果: " + sum;
    }
}
